package com.goldcn.Interceptor;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

/**
 * Created by Administrator on 2016/3/7.
 */

@Service
public class RedisService {
    @Autowired
    RedisTemplate redisTemplate;
    public String load(String userID) {
        return (String) redisTemplate.opsForValue().get(userID);
    }

    public Object loadKey(String key) {
        return redisTemplate.opsForValue().get(key);
    }
}
